var f = false; 
if (f === true) { 
  var a = 10; 
} 
 
function fn() { 
  var b = 20; 
  c = 30; 
} 
 
fn(); 
console.log(a); //underfine var变量提升
// console.log(b); //报错  b没有定义
console.log(c); //30

function fun1 () {
	console.log('fun1');
}
fun1(); //fun1fun1  因为函数声明提前
function fun1 () {
	console.log('fun1fun1');
}
fun1();  //fun1fun1  

var fun2 = function () {
	console.log('fun2');
}
fun2(); //fun2
var fun2 = function () {
	console.log('fun2fun2');
}
fun2(); //fun2fun2

